
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>

			function Father(){
				this.name = "sun"
				this.money = 10000000000
			}
			
			function Son1(){
				this.age = 18
			}
			function Son2(){
				this.age = 19
			}
			// 实例对象可以直接使用原型对象的数据
			
			Son1.prototype  = new Father()
			Son2.prototype  = new Father()
			var s1 = new Son1()
			var s2 = new Son2()
			console.log(s1)
			console.log(s2)
			console.log([])
		</script>
	</body>
</html>
